<include file="public@header">
<body style="background: #1f1e24">
    <h3 class="mytitle" style="margin-top: 0.8rem;">{:lang('Recommended friends')}</h3>
    <div class="sharebg headhead">
       <img src="__STATIC__/hybit/images/share1.png" style="width:100%" alt="">
        <div class="sharediv">
            <p>{:lang('Invitation code')}<span onclick="CopyUrl(this)"><img src="images/fuzhi.png" alt="">{:lang('Copy')}</span></p>
            <input value="{$user_relation.invitation_code}" readonly id="copyObj"/>
        </div>
        <div class="share-a">
            <a href="{:url('user/share/poster')}">{:lang('Promotion poster')}</a>
            <a href="{:url('user/share/team')}">{:lang('My team')}</a>
            <a href="{:url('user/share/fenyong')}">{:lang('Team Commission')}</a>
        </div>
    </div>
    
    <div class="alertdiv" style="display: none;">
        <div class="zz_alert">
            <p>{:lang('Copy successfully')}</p>
            <div class="zz_alertbtn">
                <p class="zz_alertbtnqr" onclick="closezalert(this)">{:lang('Confirm')}</p>
                <p class="zz_alertbtnqx" onclick="closezalert(this)">{:lang('Cancel')}</p>
            </div>
        </div>
    </div>
    <script src="__STATIC__/hybit/js/jquery.min.js"></script>
    <script>
        function CopyUrl() {
            let url = document.querySelector('#copyObj');
            url.select();
            document.execCommand("Copy");
            $('.alertdiv').show();
        }
        
        function closezalert(){
            $('.alertdiv').hide();
        }
    </script>
</body>
</html>